home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / cpp114.zoo / cpp.man < prev    next >
Encoding:
Text File  |  1995-03-14  |  14.5 KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5. CPP (1)                       30 May 1993                        CPP (1)
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. pNAMEq pq pq pq pq pq pq pq pq 
  16.  
  17.         cpp - a stand-alone C preprocessor 
  18.  
  19.  
  20.  
  21. pSYNOPSISq pq pq pq pq pq pq pq pq 
  22.  
  23.         pcppq [ p-CTVq ] [ p-Pq[012]pqpq ] [ p-Dqnamepqpq ] 
  24.  
  25.              [ p-Dqnamep=qdefpq ] [ p-Iqdirectorypqpq ] [ p-Uqnamepqpq ] 
  26.  
  27.              [ p-ansiq ] [ p-pedanticq ] [ p-fq[no-]pc++-commentsqpq ] 
  28.  
  29.              [ p-fq[no-]pimplicit-newlinesqpq ] 
  30.  
  31.              [ p-Wq[no-]pbad-charsqpq ] [ p-Wq[no-]pnested-commentsqpq ] 
  32.  
  33.              [ p-Wq[no-]pbad-concat-tokensqpq ] [ p-Wq[no-]punknown-pragmaqpq ] 
  34.  
  35.              [ pinput-fileq [ poutput-fileq ] ] 
  36.  
  37.  
  38.  
  39. pDESCRIPTIONq pq pq pq pq pq pq pq pq 
  40.  
  41.  
  42.  
  43.         pcppq  is  a  stand-alone  C preprocessor, intended for use with C
  44.  
  45.         compilers  such  as  HSC  which  do  not  provided   access   to
  46.  
  47.         preprocessor output.  It implements translation phases 1 through 
  48.  
  49.         4  as  specified  by  the  standards document ANSI/ISO 9899-1990
  50.  
  51.         describing the  C  programming  language,  including  trigraphs,
  52.  
  53.         token pasting and stringizing.  
  54.  
  55.  
  56.  
  57.         pcppq optionally  accepts  two filenames as arguments.  pinput-fileq
  58.  
  59.         and poutput-fileq are, respectively, the input  and  output  files
  60.  
  61.         for the  preprocessor.    If  not specified, or if given as `-',
  62.  
  63.         they default to the standard  input  and  the  standard  output,
  64.  
  65.         respectively.  
  66.  
  67.  
  68.  
  69. pOPTIONSq pq pq pq pq pq pq pq pq 
  70.  
  71.  
  72.  
  73.         p-Cq  
  74.  
  75.                 Pass  all  comments  (except  those  that appear on  pcppq
  76.  
  77.                 directive lines) through the preprocessor.  By  default,
  78.  
  79.                 pcppq strips out C-style comments.  
  80.  
  81.  
  82.  
  83.         p-Pq[012]  
  84.  
  85.                 Preprocess  the input without producing the line control
  86.  
  87.                 information used by the next pass of the C compiler.   A
  88.  
  89.                 numeric  argument  can be passed to -P: 0 specifies that
  90.  
  91.                 no line control information control is generated, and is 
  92.  
  93.                 equivalent to -P; 1 specifies that normal  line  control
  94.  
  95.                 information  is  generated,  which is the default; and 2
  96.  
  97.                 specifies that line control information is generated  in
  98.  
  99.                 the form of preprocessor  p#lineq directives.  
  100.  
  101.  
  102.  
  103.         p-Tq  
  104.  
  105.                 Translate trigraphs in the input file.  This behavior is 
  106.  
  107.                 implied by the p-ansiq option.  
  108.  
  109.  
  110.  
  111.         p-Dq name  
  112.  
  113.                 Define  pnameq  as  1  (one).    This  is the same as if a
  114.  
  115.                 p-Dqnamep=1qpq option appeared on the  pcppq command line, or as 
  116.  
  117.                 if a 
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. Tue Mar 14 00:38:45 1995                                          Page 1
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. CPP (1)                       30 May 1993                        CPP (1)
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.          
  146.  
  147.                 p#defineq name p1qpq 
  148.  
  149.  
  150.  
  151.          
  152.  
  153.                 line  appeared  in  the  source  file  that     pcppq   is
  154.  
  155.                 processing.  
  156.  
  157.  
  158.  
  159.         p-Dqnamep=qdef  
  160.  
  161.                 Define pnameq  as  if by a p#defineq directive.  This is the
  162.  
  163.                 same as if a 
  164.  
  165.  
  166.  
  167.          
  168.  
  169.                 p#defineq name pdefqpq 
  170.  
  171.  
  172.  
  173.          
  174.  
  175.                 line  appeared  in  the  source  file  that     pcppq   is
  176.  
  177.                 processing.  The p-Dq option has lower precedence than the 
  178.  
  179.                 p-Uq  option;  that is, if the same name is used in both a
  180.  
  181.                 p-Uq option and a p-Dq option, the name  will  be  undefined
  182.  
  183.                 regardless of the order of the options.  
  184.  
  185.  
  186.  
  187.         p-Iqdirectory  
  188.  
  189.                 Insert    pdirectoryq  into  the  search path for p#includeq
  190.  
  191.                 files with names not beginning with q`p/q', `p\q´,pq or a drive 
  192.  
  193.                 specifier.  pdirectoryq is inserted ahead of the  standard
  194.  
  195.                 list of  ``include''  directories.  Thus, p#includeq files
  196.  
  197.                 with names enclosed in double-quotes  (p"q)  are  searched
  198.  
  199.                 for first in the directory of the file with the p#includeq 
  200.  
  201.                 line,  then  in  directories  named with p-Iq options, and
  202.  
  203.                 lastly, in directories from  the  standard  list.    For
  204.  
  205.                 p#includeq  files  with  names  enclosed in angle-brackets
  206.  
  207.                 q(p<>q),pqpq the directory of the file with the  p#includeq  line
  208.  
  209.                 is not  searched.   See pUSAGEq below for exact details of
  210.  
  211.                 this search order.  
  212.  
  213.  
  214.  
  215.         p-Sq[filename]  
  216.  
  217.                 Specify an alternate configuration file.  If pfilenameq is 
  218.  
  219.                 present, the specified  file  is  read  instead  of  the
  220.  
  221.                 default  configuration  file; if pfilenameq is absent, the
  222.  
  223.                 default configuration file is  simply  not  read.    See
  224.  
  225.                 pUSAGEq below for further details.  
  226.  
  227.  
  228.  
  229.         p-Uqname  
  230.  
  231.                 Remove  any  initial definition of pnameq,pqpq where pnameq is a
  232.  
  233.                 symbol that is predefined by the preprocessor.  
  234.  
  235.  
  236.  
  237.         p-Vq  
  238.  
  239.                 Print version information to pstderrq.pqpq 
  240.  
  241.  
  242.  
  243.         p-ansiq  
  244.  
  245.                 Define the preprocessor token p__STDC__q to have value  1,
  246.  
  247.                 and enable   trigraph  translation.    To  get  p__STDC__q
  248.  
  249.                 without  trigraph  translation,  you  can  specify   the
  250.  
  251.                 options p-ansiq p-Tq.pqpq 
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259. Tue Mar 14 00:38:45 1995                                          Page 2
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269. CPP (1)                       30 May 1993                        CPP (1)
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.         p-pedanticq  
  278.  
  279.                 Issue  warnings  for  constructs which, while recognized
  280.  
  281.                 and accepted by most  preprocessors,  are  not  strictly
  282.  
  283.                 allowed by   the   ANSI/ISO  standard.    Currently  the
  284.  
  285.                 following such constructs are recognized: 
  286.  
  287.  
  288.  
  289.          
  290.  
  291.                 *  Numeric  tokens  which  fall   afoul   of   the   new
  292.  
  293.                 `preprocessing  number'  definition  in  ANSI/ISO 6.1.8,
  294.  
  295.                 such as `0x123e+1'. With or without p-pedanticq, pcppq  will
  296.  
  297.                 immediately   retokenize  the  offending  token  in  the
  298.  
  299.                 expected manner.  
  300.  
  301.  
  302.  
  303.         The following p-fq and p-Wq options can be negated by adding  a  pno-q
  304.  
  305.         before the option name.  Some are on by default.  
  306.  
  307.  
  308.  
  309.         p-fc++-commentsq  
  310.  
  311.                 Support the C++ comment indicator q`p//q´.pqpq With this option 
  312.  
  313.                 active,  everything  on the line after the p//q is treated
  314.  
  315.                 as a comment.  Off by default.  
  316.  
  317.  
  318.  
  319.         p-fimplicit-newlinesq  
  320.  
  321.                 Allow string literals to have embedded newlines,  as  in
  322.  
  323.                 the following example: 
  324.  
  325.                 
  326.                     "this is an
  327.                      example"
  328.                 
  329.                 This  option  allows  pcppq to be used on code written for
  330.  
  331.                 certain rather irritatingly  nonstandard  compilers  (we
  332.  
  333.                 won't mention GCC's name...).  Off by default.  
  334.  
  335.  
  336.  
  337.         p-Wbad-charsq  
  338.  
  339.                 Issue  a  warning  if  a  character  that cannot legally
  340.  
  341.                 appear in a C program appears  in  the  input.    On  by
  342.  
  343.                 default.  
  344.  
  345.  
  346.  
  347.         p-Wnested-commentsq  
  348.  
  349.                 Issue  a  warning  if a comment-start character sequence
  350.  
  351.                 q(`p/*q´,pqpq and q`p//q´pqpq if p-fc++-commentsq is active) appears  in
  352.  
  353.                 a comment.  Off by default.  
  354.  
  355.  
  356.  
  357.         p-Wbad-concat-tokensq  
  358.  
  359.                 Issue  a  warning if the token concatenation operator ##
  360.  
  361.                 produces an illegal C token.  On by default.  
  362.  
  363.  
  364.  
  365.         p-Wunknown-pragmaq  
  366.  
  367.                 Issue  a  warning  if  the  input  contains  a   p#pragmaq
  368.  
  369.                 directive that pcppq does not recognize.  Off by default.  
  370.  
  371.  
  372.  
  373.         Options  beginning with p-Xq are for specialized interactions with
  374.  
  375.         particular programs,  and  should    not  generally  be  invoked
  376.  
  377.         directly by  the user.  The following such options are currently
  378.  
  379.         recognized: 
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387. Tue Mar 14 00:38:45 1995                                          Page 3
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397. CPP (1)                       30 May 1993                        CPP (1)
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.         p-Xfluffq  
  406.  
  407.                 This  option  is  used  by  the  pfluffq(1)pqpq  source   code
  408.  
  409.                 checker.   It causes the preprocessor token p__FLUFF__q to
  410.  
  411.                 be defined, and enables certain related  pragmas.    See
  412.  
  413.                 the pfluffq(1)pqpq documentation for further information.  
  414.  
  415.  
  416.  
  417. pUSAGEq pq pq pq pq pq pq pq pq 
  418.  
  419.         If  you  are  familiar with C, you should already know about the
  420.  
  421.         basic  workings  of  pcppq.pqpq  We  will  not  go  into  a   detailed
  422.  
  423.         description  here,  since  any  good  book on C could do better;
  424.  
  425.         instead,  we  will   describe   details   particular   to   this
  426.  
  427.         implementation.  
  428.  
  429.  
  430.  
  431.         ppDirectory Search Orderqq pq pq pq pq pq pq pq pq 
  432.  
  433.  
  434.  
  435.  
  436.  
  437.         A  file  specified in an p#includeq directive will be searched for
  438.  
  439.         in the following directories, in order: 
  440.  
  441.  
  442.  
  443.         1.  
  444.  
  445.                 The directory of the file that contains  the    p#includeq
  446.  
  447.                 directive,  if  the  directive  is of the form `p#includeq
  448.  
  449.                 "filename"'.  
  450.  
  451.  
  452.  
  453.         2.  
  454.  
  455.                 The directories specified by p-Iq options,  in  the  order
  456.  
  457.                 they were specified.  
  458.  
  459.  
  460.  
  461.         3.  
  462.  
  463.                 The   list  of  directories  specified  in  the  pINCLUDEq
  464.  
  465.                 environment variable, in order.  
  466.  
  467.  
  468.  
  469.         ppSpecial Namesqq pq pq pq pq pq pq pq pq 
  470.  
  471.  
  472.  
  473.  
  474.  
  475.         The following macros are predefined by pcppq:pqpq 
  476.  
  477.  
  478.  
  479.         p__STDC__q  
  480.  
  481.                 Expands to 1 if the p-ansiq option is specified.  
  482.  
  483.  
  484.  
  485.         p__LINE__q  
  486.  
  487.                 Expands to an integer constant representing the  current
  488.  
  489.                 line number in the current input file.  
  490.  
  491.  
  492.  
  493.         p__FILE__q  
  494.  
  495.                 Expands  to  a  string constant representing the name of
  496.  
  497.                 the current input file.  
  498.  
  499.  
  500.  
  501.         p__DATE__q  
  502.  
  503.                 Expands to a string constant of the form "Mmm  dd  yyyy"
  504.  
  505.                 representing   the   date  on  which  preprocessing  was
  506.  
  507.                 initiated.  
  508.  
  509.  
  510.  
  511.         p__TIME__q  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519. Tue Mar 14 00:38:45 1995                                          Page 4
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529. CPP (1)                       30 May 1993                        CPP (1)
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.                 Expands to a string  constant  of  the  form  "hh:mm:ss"
  538.  
  539.                 representing  the system time at which preprocessing was
  540.  
  541.                 initiated.  
  542.  
  543.  
  544.  
  545.         ppConfiguration filesqq pq pq pq pq pq pq pq pq 
  546.  
  547.  
  548.  
  549.  
  550.  
  551.         pcppq uses a configuration file to set up site-specific predefined 
  552.  
  553.         macros.  By  default,  the  directories  specified  in  the  pLIBq
  554.  
  555.         environment   variable  are  searched  in  order  for  the  file
  556.  
  557.         pcpp_defs.hq;pqpq an alternate file can be specified from the  command
  558.  
  559.         line with the p-Sq option.  
  560.  
  561.  
  562.  
  563.         The  configuration  file  is read just like a normal input file,
  564.  
  565.         except that text  other  than  preprocessor  directives  is  not
  566.  
  567.         passed through  to  the output file.  Normally the configuration
  568.  
  569.         file will contain only comments and preprocessor directives.  In 
  570.  
  571.         addition,  two  special  pragmas  are  recognized   within   the
  572.  
  573.         configuration file only: 
  574.  
  575.  
  576.  
  577.         #pragma CPP_cmdline_arg poptionq  
  578.  
  579.                 The  single  token  poptionq is processed as though it had
  580.  
  581.                 appeared as a command-line option.  The  option  may  be
  582.  
  583.                 undone  from  the  command  line,  except  as  indicated
  584.  
  585.                 below.  
  586.  
  587.  
  588.  
  589.         #pragma CPP_delayed  
  590.  
  591.                 Normally, the configuration  file  is  processed  before
  592.  
  593.                 command-line   options   are  processed,  to  allow  the
  594.  
  595.                 commands  therein  to  be  overridden  by   command-line
  596.  
  597.                 options.   This  pragma  causes  the  command line to be
  598.  
  599.                 processed before the remainder  of  the  file,  allowing
  600.  
  601.                 conditional  setup  based  on  parameters  set  from the
  602.  
  603.                 command line.    Note   that   macro   definitions   and
  604.  
  605.                 command-line   specifications  made  after  this  pragma
  606.  
  607.                 cannot be undone from the command line.  
  608.  
  609.  
  610.  
  611.         For example, the  following  configuration  file  activates  C++
  612.  
  613.         comments  by  default,  and sets the macro p_PROTO()q according to
  614.  
  615.         the presence of the p-ansiq option: 
  616.  
  617.         
  618.             #pragma CPP_cmdline_arg -fc++-comments
  619.             #pragma CPP_delayed
  620.             #ifdef __STDC__
  621.             #  define _PROTO(x) x
  622.             #else
  623.             #  define _PROTO(x) ()
  624.             #endif
  625.         
  626.  
  627.  
  628. pSEEq pALSOq pq pq pq pq pq pq pq 
  629.  
  630.         pfluffq(1)pqpq 
  631.  
  632.  
  633.  
  634.         Documentation for your C compiler 
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642. Tue Mar 14 00:38:45 1995                                          Page 5
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652. CPP (1)                       30 May 1993                        CPP (1)
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.         Any good book on C.  
  661.  
  662.  
  663.  
  664. pDIAGNOSTICSq pq pq pq pq pq pq pq pq 
  665.  
  666.  
  667.  
  668.         The  error  messages  produced  by  pcppq  are  intended   to   be
  669.  
  670.         self-explanatory.   The line number and filename where the error
  671.  
  672.         occurred are printed along with the diagnostic.  
  673.  
  674.  
  675.  
  676. pBUGSq pq pq pq pq pq pq pq pq 
  677.  
  678.         None that I know of, but there's almost always One More Bug(TM). 
  679.  
  680.         If you should find one, please report it to me, Scott Bigham, at 
  681.  
  682.         dsb@cs.duke.edu.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774. Tue Mar 14 00:38:45 1995                                          Page 6
  775.  
  776.  
  777.  
  778.  
  779.  
  780.